home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
tex
/
td187src.lzh
/
WINUTILS.I
< prev
Wrap
Text File
|
1991-12-14
|
3KB
|
83 lines
IMPLEMENTATION MODULE WinUtils;
FROM SYSTEM IMPORT CADR;
FROM MagicSys IMPORT sINTEGER, CastToInt;
IMPORT MagicAES;
PROCEDURE SetWinTop( WinHandle : sINTEGER );
(* Setze das Fenster an oberste Position *)
VAR pxy : ARRAY [0..3] OF sINTEGER;
BEGIN
pxy[0] := WinHandle;
pxy[1] := 0; pxy[2] := 0; pxy[3] := 0;
MagicAES.WindSet ( WinHandle , MagicAES.WFTOP , pxy);
END SetWinTop;
PROCEDURE IsWinTop( WinHandle : sINTEGER ) : BOOLEAN;
(* Liegt das Fenster an oberster Position *)
VAR top : ARRAY [0..3] OF sINTEGER;
BEGIN
MagicAES.WindGet(WinHandle, MagicAES.WFTOP, top);
RETURN top[0] = WinHandle;
END IsWinTop;
(* Setze den Namen bzw. die Info-Zeile des angegebenen Fensters *)
PROCEDURE SetWinInfo( WinHandle : sINTEGER; REF InfoStr : ARRAY OF CHAR );
VAR pxy : ARRAY [0..3] OF sINTEGER;
BEGIN
pxy[0] := CastToInt(CADR ( InfoStr ) DIV 10000H);
pxy[1] := CastToInt(CADR ( InfoStr ) MOD 10000H);
pxy[2] := 0; pxy[3] := 0;
MagicAES.WindSet ( WinHandle , MagicAES.WFINFO , pxy);
END SetWinInfo;
(* Setze den Namen des angegebenen Fensters *)
PROCEDURE SetWinTitle( WinHandle : sINTEGER; REF TitleStr : ARRAY OF CHAR );
VAR pxy : ARRAY [0..3] OF sINTEGER;
BEGIN
pxy[0] := CastToInt(CADR ( TitleStr ) DIV 10000H);
pxy[1] := CastToInt(CADR ( TitleStr ) MOD 10000H);
pxy[2] := 0; pxy[3] := 0;
MagicAES.WindSet ( WinHandle , MagicAES.WFNAME , pxy);
END SetWinTitle;
PROCEDURE SetSliderSize( WinHandle : sINTEGER; sx, sy : sINTEGER);
VAR small : ARRAY [0..3] OF sINTEGER;
BEGIN
small[1] := 0; small[2] := 0; small[3] := 0;
small[0] := sx;
MagicAES.WindSet (WinHandle , MagicAES.WFHSLSIZE , small);
small[0] := sy;
MagicAES.WindSet (WinHandle , MagicAES.WFVSLSIZE , small);
END SetSliderSize;
PROCEDURE SetSliderPos( WinHandle : sINTEGER; hx, hy : sINTEGER);
VAR small : ARRAY [0..3] OF sINTEGER;
BEGIN
small[1] := 0; small[2] := 0; small[3] := 0;
small[0] := hx;
MagicAES.WindSet (WinHandle , MagicAES.WFHSLIDE, small);
small[0] := hy;
MagicAES.WindSet (WinHandle , MagicAES.WFVSLIDE , small);
END SetSliderPos;
PROCEDURE GetWinSize( WinHandle : sINTEGER; VAR size : ARRAY OF sINTEGER);
(* Index 0 : x, 1 : y, 2 : w, 3 : h *)
BEGIN
MagicAES.WindGet (WinHandle, MagicAES.WFWORKXYWH , size);
END GetWinSize;
PROCEDURE GetFirstWinRec( WinHandle : sINTEGER; VAR size : ARRAY OF sINTEGER);
(* Index 0 : x, 1 : y, 2 : w, 3 : h *)
BEGIN
MagicAES.WindGet (WinHandle, MagicAES.WFFIRSTXYWH , size);
END GetFirstWinRec;
PROCEDURE GetNextWinRec ( WinHandle : sINTEGER; VAR size : ARRAY OF sINTEGER);
(* Index 0 : x, 1 : y, 2 : w, 3 : h *)
BEGIN
MagicAES.WindGet (WinHandle, MagicAES.WFNEXTXYWH , size);
END GetNextWinRec;
END WinUtils.